'''
Created on Oct 19, 2009

@author: mkiyer
'''

from Bio import SeqIO

def get_seq_length(fastq_file):
    '''
    gets the length of the first sequence in the fasta file specified
    '''
    length = -1
    handle = open(fastq_file)
    for seq_record in SeqIO.parse(handle, "fastq"):
        length = len(seq_record)
        break
    handle.close()
    return length

if __name__ == '__main__':
    import sys
    print get_seq_length(sys.argv[1])